import java.util.Random;
import java.util.Scanner;

public class SterDemo1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Random random = new Random();
        int randNum = random.nextInt(100);
        while (true){
            System.out.println("请输入你猜的数字");
            int num = scan.nextInt();
            if(num > randNum) {
                System.out.println("你猜大了");
            } else if (num == randNum) {
                System.out.println("你猜对了");
                break;
            }else {
                System.out.println("你猜小了");
            }

        }
    }
    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNextInt () ) {
            int n = scan.nextInt();
            System.out.println(n);
        }
    }
    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);

        System.out.println("请输入姓名：");
        String name = scan.next();
        //遇到空格就结束
        System.out.println(name);
    }
    public static void main4(String[] args) {

        Scanner scan = new Scanner(System.in);

        System.out.println("请输入姓名：");
        String name = scan.nextLine();
        System.out.println(name);

        System.out.println("请输入年龄：");
        int n = scan.nextInt();
        System.out.println(n);

        System.out.println("请输入工资：");
        float f = scan.nextFloat();
        System.out.println(f);

        scan.close();
    }

    public static void main3(String[] args) {
        int sum = 0;
        for (int k = 1; k <= 5; k++) {
            int ret = 1;
            for (int i = 1; i <= k; i++) {
                ret *= i;
            }
            sum += ret ;
        }
        System.out.println(sum);
    }
    public static void main2(String[] args) {
        for (int i = 0; i < 10; i++) {
            System.out.println(i);

        }
    }
    public static void main1(String[] args) {
       int a = 1;
       int b = 0;
       while (a <= 100 ){
           if (a % 3 == 0 && a % 5 == 0 ){
               b = a ;
               a ++;
               System.out.println(b);
               continue;
           }
           a++;

       }
    }
}